Skip to content

BaseSubjectAsync class

Defined in

Namespace: ReactiveUI.Extensions.Async.Subjects Assembly: ReactiveUI.Extensions.dll Full name: ReactiveUI.Extensions.Async.Subjects.BaseSubjectAsync<T> Modifiers: public abstract

Summary

View source

        Provides a base class for asynchronous subjects that support both publishing values to observers and receiving
        values asynchronously.
        

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481

Class hierarchy
classDiagram
class BaseSubjectAsync~T~
class ObservableAsync~T~
ObservableAsync~T~ <|-- BaseSubjectAsync~T~
class ISubjectAsync~T~ {
    <>
}
ISubjectAsync~T~ <|.. BaseSubjectAsync~T~
class IObserverAsync~T~ {
    <>
}
IObserverAsync~T~ <|.. BaseSubjectAsync~T~
class IAsyncDisposable {
    <>
}
IAsyncDisposable <|.. BaseSubjectAsync~T~
class IObservableAsync~T~ {
    <>
}
IObservableAsync~T~ <|.. BaseSubjectAsync~T~

Inherits from: ObservableAsync

Implements: ISubjectAsync, IObserverAsync, IAsyncDisposable, IObservableAsync

Remarks

This class enables the implementation of asynchronous subjects that can broadcast values, errors, and completion notifications to multiple observers. It manages observer registration, notification, and completion in a thread-safe manner. Derived classes should override the core notification methods to customize how observers are notified asynchronously. The subject supports asynchronous subscription and notification patterns, making it suitable for reactive and event-driven programming scenarios.

Constructors

NameSummary
.ctor

Methods

NameSummary
OnNextAsyncAsynchronously notifies all subscribed observers of a new value.
OnErrorResumeAsyncNotifies all observers of an error and allows asynchronous error handling to resume observation.
OnCompletedAsyncNotifies all registered observers that the asynchronous operation has completed and provides the final result.
DisposeAsyncAsynchronously releases the unmanaged resources used by the object.
SubscribeAsyncCoreSubscribes the specified asynchronous observer to receive notifications from the observable sequence.
OnNextAsyncCoreAsynchronously notifies the specified observers with the provided value.
OnErrorResumeAsyncCoreHandles error recovery for the specified observers by resuming asynchronous processing after an error occurs.
OnCompletedAsyncCoreInvoked to asynchronously notify all observers of the completion event with the specified result.
Inherited members